<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1" xml:lang="en">
  <title id="fv141670">pg_am</title>
  <body>
    <p>The <codeph>pg_am</codeph> table stores information about index access
methods. There is one row for each index access method supported by the
system.</p>
    <table id="fv141982">
      <title>pg_catalog.pg_am</title>
      <tgroup cols="4">
        <colspec colnum="1" colname="col1" colwidth="131pt"/><colspec colnum="2" colname="col2" colwidth="86pt"/><colspec colnum="3" colname="col3" colwidth="85pt"/><colspec colnum="4" colname="col4" colwidth="147pt"/>
        <thead>
          <row>
            <entry colname="col1">column</entry>
            <entry colname="col2">type</entry>
            <entry colname="col3">references</entry>
            <entry colname="col4">description</entry>
          </row>
        </thead>
        <tbody>
          <row>
            <entry colname="col1"><codeph>oid</codeph></entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3"/>
            <entry colname="col4">Row identifier (hidden attribute; must be explicitly selected)</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>amname</codeph></entry>
            <entry colname="col2">name</entry>
            <entry colname="col3"/>
            <entry colname="col4">Name of the access method</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>amstrategies</codeph></entry>
            <entry colname="col2">int2</entry>
            <entry colname="col3"/>
            <entry colname="col4">Number of operator strategies for this access
method,
              or zero if the access method does not have a fixed set of operator strategies</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>amsupport</codeph></entry>
            <entry colname="col2">int2</entry>
            <entry colname="col3"/>
            <entry colname="col4">Number of support routines for this access method</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>amcanorder</codeph></entry>
            <entry colname="col2">boolean</entry>
            <entry colname="col3"/>
            <entry colname="col4">Does the access method support ordered scans sorted by the indexed
              column's value?</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>amcanorderbyop</codeph></entry>
            <entry colname="col2">boolean</entry>
            <entry colname="col3"/>
            <entry colname="col4">Does the access method support ordered scans sorted by the result
              of an operator on the indexed column?</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>amcanbackward</codeph></entry>
            <entry colname="col2">boolean</entry>
            <entry colname="col3"/>
            <entry colname="col4">Does the access method support backward scanning?</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>amcanunique</codeph></entry>
            <entry colname="col2">boolean</entry>
            <entry colname="col3"/>
            <entry colname="col4">Does the access method support unique indexes?</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>amcanmulticol</codeph></entry>
            <entry colname="col2">boolean</entry>
            <entry colname="col3"/>
            <entry colname="col4">Does the access method support multicolumn indexes?</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>amoptionalkey</codeph></entry>
            <entry colname="col2">boolean</entry>
            <entry colname="col3"/>
            <entry colname="col4">Does the access method support a scan without
              any constraint for the first index column?</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>amsearcharray</codeph></entry>
            <entry colname="col2">boolean</entry>
            <entry colname="col3"/>
            <entry colname="col4">Does the access method support <codeph>ScalarArrayOpExpr</codeph>
              searches?</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>amsearchnulls</codeph></entry>
            <entry colname="col2">boolean</entry>
            <entry colname="col3"/>
            <entry colname="col4">Does the access method support <codeph>IS NULL/NOT NULL</codeph>
              searches?</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>amstorage</codeph></entry>
            <entry colname="col2">boolean</entry>
            <entry colname="col3"/>
            <entry colname="col4">Can index storage data type differ from column
data type?</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>amclusterable</codeph></entry>
            <entry colname="col2">boolean</entry>
            <entry colname="col3"/>
            <entry colname="col4">Can an index of this type be clustered on?</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>ampredlocks</codeph></entry>
            <entry colname="col2">boolean</entry>
            <entry colname="col3"/>
            <entry colname="col4">Does an index of this type manage fine-grained predicae locks?</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>amkeytype</codeph></entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3">pg_type.oid</entry>
            <entry colname="col4">Type of data stored in index, or zero if not a fixed type</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>aminsert</codeph></entry>
            <entry colname="col2">regproc</entry>
            <entry colname="col3">pg_proc.oid</entry>
            <entry colname="col4">"Insert this tuple" function</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>ambeginscan</codeph></entry>
            <entry colname="col2">regproc</entry>
            <entry colname="col3">pg_proc.oid</entry>
            <entry colname="col4">"Prepare for index scan" function</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>amgettuple</codeph></entry>
            <entry colname="col2">regproc</entry>
            <entry colname="col3">pg_proc.oid</entry>
            <entry colname="col4">"Next valid tuple" function, or zero if none</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>amgetbitmap</codeph></entry>
            <entry colname="col2">regproc</entry>
            <entry colname="col3">pg_proc.oid</entry>
            <entry colname="col4">"Fetch all tuples" function, or zero if none</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>amrescan</codeph></entry>
            <entry colname="col2">regproc</entry>
            <entry colname="col3">pg_proc.oid</entry>
            <entry colname="col4">"(Re)start index scan" function</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>amendscan</codeph></entry>
            <entry colname="col2">regproc</entry>
            <entry colname="col3">pg_proc.oid</entry>
            <entry colname="col4">"Clean up after index scan" function</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>ammarkpos</codeph></entry>
            <entry colname="col2">regproc</entry>
            <entry colname="col3">pg_proc.oid</entry>
            <entry colname="col4">"Mark current scan position" function</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>amrestrpos</codeph></entry>
            <entry colname="col2">regproc</entry>
            <entry colname="col3">pg_proc.oid</entry>
            <entry colname="col4">"Restore marked scan position" function</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>ambuild</codeph></entry>
            <entry colname="col2">regproc</entry>
            <entry colname="col3">pg_proc.oid</entry>
            <entry colname="col4">"Build new index" function</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>ambuildempty</codeph></entry>
            <entry colname="col2">regproc</entry>
            <entry colname="col3">pg_proc.oid</entry>
            <entry colname="col4">"Build empty index" function</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>ambulkdelete</codeph></entry>
            <entry colname="col2">regproc</entry>
            <entry colname="col3">pg_proc.oid</entry>
            <entry colname="col4">Bulk-delete function</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>amvacuumcleanup</codeph></entry>
            <entry colname="col2">regproc</entry>
            <entry colname="col3">pg_proc.oid</entry>
            <entry colname="col4">Post-<codeph>VACUUM</codeph> cleanup function</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>amcanreturn</codeph></entry>
            <entry colname="col2">regproc</entry>
            <entry colname="col3">pg_proc.oid</entry>
            <entry colname="col4">Function to check whether index supports index-only scans, or
              zero if none</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>amcostestimate</codeph></entry>
            <entry colname="col2">regproc</entry>
            <entry colname="col3">pg_proc.oid</entry>
            <entry colname="col4">Function to estimate cost of an index scan</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>amoptions</codeph></entry>
            <entry colname="col2">regproc</entry>
            <entry colname="col3">pg_proc.oid</entry>
            <entry colname="col4">Function to parse and validate <codeph>reloptions</codeph> for
              an index</entry>
          </row>
        </tbody>
      </tgroup>
    </table>
  </body>
</topic>
